<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>epydoc.docwriter.xlink.UrlGenerator</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="epydoc-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://epydoc.sourceforge.net">epydoc 3.0beta1</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="epydoc-module.html">Package&nbsp;epydoc</a> ::
        <a href="epydoc.docwriter-module.html">Package&nbsp;docwriter</a> ::
        <a href="epydoc.docwriter.xlink-module.html">Module&nbsp;xlink</a> ::
        Class&nbsp;UrlGenerator
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="epydoc.docwriter.xlink.UrlGenerator-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class UrlGenerator</h1><span class="codelink"><a href="epydoc.docwriter.xlink-pysrc.html#UrlGenerator">source&nbsp;code</a></span><br /><br />
<center>
<center>  <map id="uml_class_diagram_for_epydoc_d_9" name="uml_class_diagram_for_epydoc_d_9">
<area shape="rect" href="epydoc.docwriter.xlink.DocUrlGenerator&#45;class.html" title="Read a documentation index and generate URL&#39;s for it." alt="" coords="6,112,142,150" />
<area shape="rect" href="epydoc.docwriter.xlink.VoidUrlGenerator&#45;class.html" title="Don&#39;t actually know any url, but don&#39;t report any error." alt="" coords="171,112,310,150" />
<area shape="rect" href="epydoc.docwriter.xlink.UrlGenerator.IndexAmbiguous&#45;class.html" title="The name looked for is ambiguous" alt="" coords="56,28,256,47" />
<area shape="rect" href="epydoc.docwriter.xlink.UrlGenerator&#45;class.html#get_url" title="Look for a name and return the matching URL documentation." alt="" coords="56,50,256,68" />
<area shape="rect" href="epydoc.docwriter.xlink.UrlGenerator&#45;class.html#get_canonical_name" title="Convert an object name into a canonical name." alt="" coords="56,68,256,87" />
<area shape="rect" href="epydoc.docwriter.xlink.UrlGenerator&#45;class.html" title="Generate URL from an object name." alt="" coords="44,6,268,94" />
</map>
  <img src="uml_class_diagram_for_epydoc_d_9.gif" alt='' usemap="#uml_class_diagram_for_epydoc_d_9" ismap="ismap" class="graph-without-title" />
</center></center>
<hr />
Generate URL from an object name.<br /><br />

<!-- ==================== NESTED CLASSES ==================== -->
<a name="section-NestedClasses"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Nested Classes</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-NestedClasses"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="epydoc.docwriter.xlink.UrlGenerator.IndexAmbiguous-class.html" class="summary-name">IndexAmbiguous</a><br />
      The name looked for is ambiguous
    </td>
  </tr>
</table>
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type"><code class="link">str</code></span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="epydoc.docwriter.xlink.UrlGenerator-class.html#get_url" class="summary-sig-name">get_url</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>)</span><br />
      Look for a name and return the matching URL documentation.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="epydoc.docwriter.xlink-pysrc.html#UrlGenerator.get_url">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type"><code class="link">tuple</code> of <code class="link">str</code></span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="epydoc.docwriter.xlink.UrlGenerator-class.html#get_canonical_name" class="summary-sig-name">get_canonical_name</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>)</span><br />
      Convert an object name into a canonical name.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="epydoc.docwriter.xlink-pysrc.html#UrlGenerator.get_canonical_name">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="_SEP_RE"></a><span class="summary-name">_SEP_RE</span> = <code title="re.compile(r'(?x)([a-zA-Z0-9_]+)|(\.|::|-&gt;)|(.)')">re.compile(r'<code class="re-flags">(?x)</code><code class="re-group">(</code><code class="re-group">[</code>a<code class="re-op">-</code>zA<code class="re-op">-</code>Z0<code class="re-op">-</code>9_<code class="re-group">]</code><code class="re-op">+</code><code class="re-group">)</code><code class="re-op">|</code><code class="re-group">(</code>\.<code class="re-op">|</code>::<code class="re-op">|</code>-&gt;<code class="re-group">)</code><code class="re-op">|</code><code class="re-group">(</code>.<code class="re-group">)</code>')</code>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="get_url"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">get_url</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">name</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="epydoc.docwriter.xlink-pysrc.html#UrlGenerator.get_url">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>Look for a name and return the matching URL documentation.</p>
<p>First look for a fully qualified name. If not found, try with partial
name.</p>
<p>If no url exists for the given object, return <code class="link">None</code>.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>name</code></strong> (<code class="link">str</code>) - the name to look for</li>
    </ul></dd>
    <dt>Returns: <code class="link">str</code></dt>
        <dd>the URL that can be used to reach the <code class="link">name</code> documentation.
<code class="link">None</code> if no such URL exists.</dd>
    <dt>Raises:</dt>
    <dd><ul class="nomargin-top">
        <li><code><strong class='fraise'>IndexError</strong></code> - no object found with <code class="link">name</code></li>
        <li><code><strong class='fraise'><a href="epydoc.docwriter.xlink.UrlGenerator.IndexAmbiguous-class.html">DocUrlGenerator.IndexAmbiguous</a></strong></code> - more than one object found with
a non-fully qualified name; notice that this is an <tt class="rst-docutils literal"><span class="pre">IndexError</span></tt>
subclass</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="get_canonical_name"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">get_canonical_name</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">name</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="epydoc.docwriter.xlink-pysrc.html#UrlGenerator.get_canonical_name">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>Convert an object name into a canonical name.</p>
<p>the canonical name of an object is a tuple of strings containing its
name fragments, splitted on any allowed separator ('<tt class="rst-docutils literal"><span class="pre">.</span></tt>', '<tt class="rst-docutils literal"><span class="pre">::</span></tt>',
'<tt class="rst-docutils literal"><span class="pre">-&gt;</span></tt>').</p>
<p>Noise such parenthesis to indicate a function is discarded.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>name</code></strong> (<code class="link">str</code>) - an object name, such as <tt class="rst-docutils literal"><span class="pre">os.path.prefix()</span></tt> or <tt class="rst-docutils literal"><span class="pre">lib::foo::bar</span></tt></li>
    </ul></dd>
    <dt>Returns: <code class="link">tuple</code> of <code class="link">str</code></dt>
        <dd>the fully qualified name such <tt class="rst-docutils literal"><span class="pre">('os',</span> <span class="pre">'path',</span> <span class="pre">'prefix')</span></tt> and
<tt class="rst-docutils literal"><span class="pre">('lib',</span> <span class="pre">'foo',</span> <span class="pre">'bar')</span></tt></dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="epydoc-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://epydoc.sourceforge.net">epydoc 3.0beta1</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    <a href="epydoc-log.html">Generated by Epydoc
    3.0beta1 on Tue Feb 27 06:04:45 2007</a>
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>
